#include <stdio.h>
#include <string.h>

int count( char p[], char q[]) {
	int m, n, k, num = 0;
	for (m = 0; p[m]; m++)
		for (n = m, k = 0; q[k] == p[n]; k++, n++)
			if (q[k + 1] == '\0') {
				num++;
				break;
			}
	return (num);
}

int main() {
	char s[80], sub[80];
	int n;
	gets(s);
	gets(sub);
	printf("%d\n", count(s, sub));
}
